:root {
    --sidebar-bg: #2c3e50;
    --sidebar-hover: #34495e;
    --primary-color: #3498db;
    --success-color: #2ecc71;
    --warning-color: #f1c40f;
    --danger-color: #e74c3c;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --border-color: #ecf0f1;
    --card-bg: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f6fa;
    color: var(--text-primary);
}

.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏样式 */
.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    color: white;
    padding: 20px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.logo {
    padding: 0 20px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    width: 32px;
    height: 32px;
}

.logo span {
    font-size: 18px;
    font-weight: 500;
}

.sidebar nav ul {
    list-style: none;
}

.sidebar nav ul li {
    margin: 2px 0;
}

.sidebar nav ul li a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar nav ul li.active a,
.sidebar nav ul li a:hover {
    background: var(--sidebar-hover);
    color: white;
}

.sidebar nav ul li a i {
    margin-right: 10px;
    font-size: 20px;
}

/* 主内容区域 */
.main-content {
    margin-left: 260px;
    padding: 20px;
    width: calc(100% - 260px);
}

/* 顶部栏 */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 10px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notification {
    position: relative;
}

.badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
}

.user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.trend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
}

.trend.up { color: var(--success-color); }
.trend.down { color: var(--danger-color); }
.trend.neutral { color: var(--warning-color); }

.value {
    font-size: 28px;
    font-weight: 600;
    margin: 10px 0;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 14px;
}

/* 内容网格 */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.hot-topics, .map-card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-tools {
    display: flex;
    gap: 8px;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    color: var(--text-secondary);
}

.btn-icon:hover {
    background: var(--border-color);
}

/* 话题列表 */
.topics-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.topic-item {
    display: flex;
    gap: 12px;
    padding: 8px;
    border-bottom: 1px solid var(--border-color);
}

.rank {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 24px;
}

.topic-content {
    flex: 1;
}

.topic-content .title {
    margin-bottom: 4px;
    line-height: 1.4;
}

.metrics {
    display: flex;
    gap: 16px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* 地图容器 */
#chinaMap {
    height: 400px;
    width: 100%;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }
    
    .sidebar .logo span,
    .sidebar nav ul li a span {
        display: none;
    }
    
    .main-content {
        margin-left: 60px;
        width: calc(100% - 60px);
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* 工具栏样式 */
.tools-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.search-box {
    display: flex;
    gap: 10px;
    flex: 1;
    max-width: 400px;
}

.search-box input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
}

.filter-group {
    display: flex;
    gap: 10px;
}

.filter-group select,
.filter-group input {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
}

/* 标签样式 */
.tag {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.tag-positive {
    background: #e3fcef;
    color: #00875a;
}

.tag-neutral {
    background: #fff7e6;
    color: #b76e00;
}

.tag-negative {
    background: #ffe8e6;
    color: #c41d7f;
}

/* 进度条样式 */
.progress-bar {
    width: 100px;
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: var(--primary-color);
    border-radius: 3px;
}

/* 操作按钮组 */
.action-buttons {
    display: flex;
    gap: 8px;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
}

.btn-page {
    min-width: 32px;
    height: 32px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: white;
}

.btn-page.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-page:hover:not(.active) {
    background: var(--border-color);
} 